package com.ruoyi.yyq.api;

import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.common.security.annotation.InnerAuth;
import com.ruoyi.common.security.annotation.RequiresPermissions;
import com.ruoyi.yyq.api.domain.CarOrder;
import com.ruoyi.yyq.api.domain.CarServiceDetails;
import com.ruoyi.yyq.api.factory.RemoteCarOrderFallbackFactory;
import com.ruoyi.yyq.api.factory.RemoteCarServiceDetailsFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;


@FeignClient(contextId = "remoteCarOrderService", value = ServiceNameConstants.YYQ_SERVICE, fallbackFactory = RemoteCarOrderFallbackFactory.class)
public interface RemoteCarOrderService {

    /**
     * 对外暴露查询订单信息列表
     */
    @GetMapping("/orders/getlist")
    public TableDataInfo getlist(@RequestHeader(SecurityConstants.FROM_SOURCE) String source,CarOrder carOrder);
    /**
     * 对外暴露新增订单信息
     */
    @PostMapping("/orders/getadd")
    public AjaxResult getadd(@RequestHeader(SecurityConstants.FROM_SOURCE) String source,@RequestBody CarOrder carOrder);
    /**
     * 对外暴露修改订单信息
     */
    @PutMapping("/orders/getedit")
    public AjaxResult getedit(@RequestHeader(SecurityConstants.FROM_SOURCE) String source,@RequestBody CarOrder carOrder);
    /**
     * 对外暴露删除订单信息
     */
    @DeleteMapping("/orders/getremove/{ids}")
    public AjaxResult getremove(@RequestHeader(SecurityConstants.FROM_SOURCE) String source,@PathVariable("ids") Long[] ids);
    /**
     * 对外暴露根据核销码查询订单信息
     */
    @GetMapping(value = "/orders/getcode")
    public AjaxResult getcode(@RequestHeader(SecurityConstants.INNER) String source,String verificationCode);
}
